package edu.sctu.zcy.month201505.day20150524;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by user24 on 2015/5/24.
 */
public class SetDemo {

    public static void main(String[] args) {


        String[] strings = {"10001", "10002", "10003", "10004", "10005", "10002"};
        Set set = new HashSet<>();

        for (int i = 0; i < strings.length; i++) {


            if(!set.add(strings[i])){

                System.out.println("重复的字符："+strings[i]);
            }

        }
        System.out.println(set);
    }
}
